label: Shorten set_markup_internal a bit
authorTimm Bäder <mail@baedert.org>
Fri, 10 Apr 2020 14:35:15 +0000 (16:35 +0200)
committerTimm Bäder <mail@baedert.org>
Fri, 17 Apr 2020 13:21:00 +0000 (15:21 +0200)
gtk/gtklabel.c

index a586ccf77fc506be763e84ef4c9bec8d2555f4a0..8e9f31b23cb842a62b28a7bcbe49b55faf6696a2 100644 (file)
@@ -2411,8 +2411,7 @@ gtk_label_set_markup_internal (GtkLabel    *label,
 
   if (attrs)
     {
-      if (priv->markup_attrs)
-       pango_attr_list_unref (priv->markup_attrs);
+      g_clear_pointer (&priv->markup_attrs, pango_attr_list_unref);
       priv->markup_attrs = attrs;
     }